IdeaBlade.EntityModel.Compat Assembly > IdeaBlade.EntityModel.Compat Namespace > EntityScalarQueryAsyncExtensions Class > All Method : All(IEntityScalarQuery,IPredicateDescription,Action<EntityScalarQueryOperation<Boolean>>,Object) Method |
'Declaration
<ExtensionAttribute()> Public Overloads Shared Function All( _ ByVal source As IEntityScalarQuery, _ ByVal predicateDescription As IPredicateDescription, _ ByVal userCallback As Action(Of EntityScalarQueryOperation(Of Boolean)), _ Optional ByVal userState As Object _ ) As EntityScalarQueryOperation(Of Boolean)
'Usage
Dim source As IEntityScalarQuery Dim predicateDescription As IPredicateDescription Dim userCallback As Action(Of EntityScalarQueryOperation(Of Boolean)) Dim userState As Object Dim value As EntityScalarQueryOperation(Of Boolean) value = EntityScalarQueryAsyncExtensions.All(source, predicateDescription, userCallback, userState)
public void AsyncAllWithPredicate() { var op = _entityManager.Employees.AsScalarAsync().All(e => e.Country == "Brazil"); op.Completed += (o, e) => { bool result = e.Result; }; }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2